package com.eshopkeeper.core.support.alipay.config;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.eshopkeeper.core.util.PropertiesUtil;

public class AlipayConfig {

	public static final Logger logger = LogManager.getLogger(AlipayConfig.class);

	// 合作身份者ID，签约账号，以2088开头由16位纯数字组成的字符串，查看地址：https://b.alipay.com/order/pidAndKey.htm
	public static String partner;//2088811441236084 蜂巢
	
	// 收款支付宝账号，以2088开头由16位纯数字组成的字符串，一般情况下收款账号就是签约账号
	public static String seller_id = partner;

	//商户的私钥,需要PKCS8格式，RSA公私钥生成：https://doc.open.alipay.com/doc2/detail.htm?spm=a219a.7629140.0.0.nBDxfy&treeId=58&articleId=103242&docType=1
	public static String private_key;//MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAMeKpj/cWOb5VZZOFd5aCRRiBJq4wMVtIfcy8rvwToLGHBXwCBxyFxZHQnDT88g7kMhK/rk7KBJCh/mIuaJzK2SMwOfK4JDcYyA8SCaY3ebqeFoh/HDOhB1jLHv3FcFjOct1zFhPeCxbfh8Bbf+WIYaHAvVX8iSf5Up3evDpSsQNAgMBAAECgYAOQ7YgyJK+aEKbDRf5HjyZ7Wvg16ZINsX/0u+RSduC88CcPN2HkwxddlikkjJSNRfjiaDuAvGZZJIt331NxKfsVqpaJp5utiXgHvF/tIz7Z2MqwuxsYbXFGbFW9UgWDca123ZNYC6mY1yDNoE5k9KtcqhvBf/f0CyXC+ggzcAP4QJBAP8bfJ6teUCTuFY5ncB7J7ScqcB116pS+mBThXyY+tNfFIwsDeFjX/wzIApK05D7ZCQswm+vZ74+UNb5RoUjdrkCQQDIPWOwLxXUD1KnEyTKy/2lhCTDtU0EYblqpOhYxUSTM09bDiGH7PzI7Brw/lajfSo8e/JnzURIaad44ZQ2iM31AkEAtulwax2ayNCh5UEeePpUt810cUiNP9SLLTH1jibqAVA1HWQg97AXDG9j071fAJ8faEiniQjNa7ymndzR0XhiEQJBAI10WK0IxjnVTUU7z9z3eErp6/LZa/vxcUO2FXFIgiYetCuV8vgL4ZOqv2mJsvixnhm2Ucskhd1FzgomCUbxI9UCQQChsbhvRevGNtU9FNWbro+R/CfkfhHHRr51NK/e3TvVsVvOgWq8WeBe2NxgZAuZMTY+nahEcgNF79xOor7h+JJx

	
	// 支付宝的公钥,查看地址：https://b.alipay.com/order/pidAndKey.htm
	public static String alipay_public_key;//MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCnxj/9qwVfgoUh/y2W89L6BkRAFljhNhgPdyPuBV64bfQNN1PjbCzkIM6qRdKBoLPXmKKMiFYnkd6rAoprih3/PrQEB/VsW8OoM8fxn67UDYuyBTqA23MML9q1+ilIZwBC2AQ2UBVOrFXfFl75p6/B5KsiNG9zpgmLCUYuLkxpLQIDAQAB

	// 服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问 http://ifci.lianbijr.com/create_direct_pay_by_user-JAVA-UTF-8/notify_url.jsp
	public static String notify_url;

	// 页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问 http://ifci.lianbijr.com/create_direct_pay_by_user-JAVA-UTF-8/return_url.jsp
	public static String return_url;

	// 签名方式
	public static String sign_type = "RSA";
	
	// 调试用，创建TXT日志文件夹路径，见AlipayCore.java类中的logResult(String sWord)打印方法。
	public static String log_path = "C:\\";
		
	// 字符编码格式 目前支持 gbk 或 utf-8
	public static String input_charset = "utf-8";
		
	// 支付类型 ，无需修改
	public static String payment_type = "1";
		
	// 调用的接口名，无需修改
	public static String service = "create_direct_pay_by_user";


//↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
	
//↓↓↓↓↓↓↓↓↓↓ 请在这里配置防钓鱼信息，如果没开通防钓鱼功能，为空即可 ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
	
	// 防钓鱼时间戳  若要使用请调用类文件submit中的query_timestamp函数
	public static String anti_phishing_key = "";
	
	// 客户端的IP地址 非局域网的外网IP地址，如：221.0.0.1
	public static String exter_invoke_ip = "";
		
//↑↑↑↑↑↑↑↑↑↑请在这里配置防钓鱼信息，如果没开通防钓鱼功能，为空即可 ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

	static {
		partner = PropertiesUtil.getString("alipay.partner");
		seller_id = PropertiesUtil.getString("alipay.partner");
		private_key = PropertiesUtil.getString("alipay.private.key");
		alipay_public_key = PropertiesUtil.getString("alipay.public.key");
		notify_url = PropertiesUtil.getString("alipay.notify.url");
		return_url = PropertiesUtil.getString("alipay.return.url");
	}
	
}

